<?php

class Application_Model_Rent extends Application_Model_ModelAbstract implements Application_Model_ListElement
{
    public $rent_id;
    public $rent_title;
    public $rent_photo;
    public $rent_category;
    public $rent_is_active;
    public $rent_desc;
    public $rent_price;
    public $rent_price_more;
    public $rent_date;
    public $rent_bail;

    /**
     * @param mixed $rent_category
     */
    public function setRentCategory($rent_category)
    {
        $this->rent_category = $rent_category;
    }

    /**
     * @return mixed
     */
    public function getRentCategory()
    {
        return $this->rent_category;
    }

    /**
     * @param mixed $rent_date
     */
    public function setRentDate($rent_date)
    {
        $this->rent_date = $rent_date;
    }

    /**
     * @return mixed
     */
    public function getRentDate()
    {
        return $this->rent_date;
    }

    /**
     * @param mixed $rent_desc
     */
    public function setRentDesc($rent_desc)
    {
        $this->rent_desc = $rent_desc;
    }

    /**
     * @return mixed
     */
    public function getRentDesc()
    {
        return $this->rent_desc;
    }

    /**
     * @param mixed $rent_id
     */
    public function setRentId($rent_id)
    {
        $this->rent_id = $rent_id;
    }

    /**
     * @return mixed
     */
    public function getId()
    {
        return $this->rent_id;
    }

    /**
     * @param mixed $rent_is_active
     */
    public function setRentIsActive($rent_is_active)
    {
        $this->rent_is_active = $rent_is_active;
    }

    /**
     * @return mixed
     */
    public function getRentIsActive()
    {
        return $this->rent_is_active;
    }

    /**
     * @param mixed $rent_photo
     */
    public function setRentPhoto($rent_photo)
    {
        $this->rent_photo = $rent_photo;
    }

    /**
     * @return mixed
     */
    public function getRentPhoto($withoutPrefix = false)
    {
        if ($withoutPrefix) {
            return $this->rent_photo;
        }
        return '/i/rent/' . $this->rent_photo;
    }
    /**
     * @return mixed
     */
    public function getThumbPhoto()
    {
        return '/i/rent/thumb/' . $this->rent_photo;
    }

    /**
     * @param mixed $rent_price
     */
    public function setRentPrice($rent_price)
    {
        $this->rent_price = $rent_price;
    }

    /**
     * @return mixed
     */
    public function getRentPrice()
    {
        return $this->rent_price;
    }

    /**
     * @param mixed $rent_price_more
     */
    public function setRentPriceMore($rent_price_more)
    {
        $this->rent_price_more = $rent_price_more;
    }

    /**
     * @return mixed
     */
    public function getRentPriceMore()
    {
        return $this->rent_price_more? $this->rent_price_more : 'по запросу';
    }

    /**
     * @param mixed $rent_title
     */
    public function setRentTitle($rent_title)
    {
        $this->rent_title = $rent_title;
    }

    /**
     * @return mixed
     */
    public function getRentTitle()
    {
        return $this->rent_title;
    }

    public function getTitle()
    {
        return $this->getRentTitle();
    }

    public function getDesc()
    {
        $view = new Zend_View();
        $view->setScriptPath(APPLICATION_PATH . '/views/scripts/');
        $view->rent = $this;
        return $view->render('catalog/rent-good.phtml');
    }

    public function getIconUrl()
    {
        return $this->getRentPhoto();
    }

    public function getRentBail()
    {
        return $this->rent_bail;
    }

    public function setRentBail($value)
    {
        return $this->rent_bail = $value;
    }

    public function getUrl()
    {
        return '/rent/';
    }
}